package ch07.OceanWorld3;

/**
 * Created by 其 on 2016/3/27.
 */
public class Submarine implements Swimmer {
    private String name;

    public Submarine(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    @Override
    public void swim() {
        System.out.printf("潜水艇 %s 潜行%n", name);
    }
}
